/*
 * Copyright 2007 National Bioinformatics Network
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package dgbgui.modeldocument.definition;

import java.io.Serializable;

/**
 * @author bjnortier
 * The node that represents the definition of a query
 */
public abstract class Definition implements Serializable, Cloneable
{
    
    public Definition() {
        // Do nothing
    }
    
    /**
     * Get the dgbQL string for the definition node
     * @return the query string
     */
    public abstract String getdgbQLString();
    
    
    /**
     * @return The name of the definition type
     */
    public abstract String getTypeName();
    

    public Object clone() { 
        Definition o = null;
        try {
            o = (Definition)super.clone();
        } catch(CloneNotSupportedException e) {
            System.err.println("Definition can't clone");
        }
        return o;
    }
    
    
    // ------------------- Serialization -------------
    
    //
    // Definition doesn't serialise anythign at the moment, but
    // still has a version as the wntire hierarchy must
    // have versions if there are fields that will be serilaised
    // in the future
    //
    
    
    /**
     * First serilization version
     */
    private static final long serialVersionUID = 1L;
    

}
